//
//  NewCarsDetailViewController.m
//  一键车讯
//
//  Created by 江玉元 on 14/11/1.
//  Copyright (c) 2014年 lanou.3g.com. All rights reserved.
//

#import "NewCarsDetailViewController.h"

@interface NewCarsDetailViewController ()
@property (nonatomic, retain)UIScrollView *scrollView;
@property (nonatomic, retain)UIWebView *webView;

@end

@implementation NewCarsDetailViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    
    }
    return self;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y - 142, self.view.frame.size.width, self.view.frame.size.height + 142)];
    [self.view addSubview:_scrollView];
    _scrollView.showsVerticalScrollIndicator = NO;
    _scrollView.bounces = NO;
    
    _scrollView.delegate = self;
    
    
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height + 92)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.newcars.url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60];
    self.webView.scrollView.showsVerticalScrollIndicator = NO;
    [self.webView loadRequest:request];
    self.webView.scrollView.bounces = NO;
    [self.scrollView addSubview:self.webView];
    [self.webView release];
    [_scrollView release];

}

- (void)dealloc
{
    [_scrollView release];
    [_webView release];
    [super dealloc];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
